<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script>

</head>
<body>
<div id="app">
    <table border="" cellspacing="" cellpadding="">
        <tr>
            <th>姓名</th>
            <th>成绩</th>
            <th>等级</th>
        </tr>
        <!-- // key 需要指定一个数据中唯一的值 -->
        <tr v-for='item in stus' :key='item.score'>
            <td>{{item.name}}</td>
            <td>{{item.score}}</td>
            <td v-if="item.score>80">优秀</td>
            <td v-else-if="item.score>60">良好</td>
            <td v-else>不及格</td>
        </tr>
    </table>

</div>
<script type="text/javascript">
    /*
    0-60   不及格
    60--80  良好
    80-100  优秀
    v-for：循环语句

    */
    var vue = new Vue({
        el: "#app",
        data: {
            stus: [{
                name: '木森',
                score: 100
            },
                {
                    name: '盼盼达',
                    score: 78
                },
                {
                    name: '好好先生',
                    score: 89
                },
                {
                    name: '枫',
                    score: 99
                },
            ],
            score: 88,
            user: 'musen'
        }

    })
</script>


</body>
</html>
